<!DOCTYPE html>
<html>
	<head>
		<meta charset="UTF-8">
		<title></title>
	</head>
	<link rel="stylesheet" href="css/public.css" />
	<link rel="stylesheet" href="css/shop.css" />
	<body>
		<header>
			<div class="margin">
				<div class="h-l">
					<img src="images/h-car.png" class="h-car"/>
					<span>送至：上海</span>
					<img src="images/h-jian.png" class="h-jian"/>
					<a href="denglu.html"><span>登录</span></a>
					<span>|</span>
					<a href="zhuce.html"><span>注册</span></a>
					<span>|</span>
					<a id="remove">注销</a>
					<img src="images/h-list.png" class="h-car"/>
					<span>我的订单</span>
					<span>收藏本站(Ctrl+D)</span>
				</div>
				
				<div class="h-r">
					<img src="images/h-iphone.png" class="h-iphone"/>
					<span>手机APP</span>
					<span>帮助中心</span>
					<img src="images/h-jian.png" class="h-jian"/>
					<span>我要兑换</span>
					<img src="images/h-right.png" class="h-right"/>
					<img src="images/h-shop.png" class="h-car"/>
					<span>商家中心</span>
				</div>
			</div>
		</header>
		<!--首页搜索logo部分-->
		<section class="margin" id="search">
			<a href="#"><img src="images/logo.png" class="logo"/></a>
			<div class="search-r">
				<form>
					<img src="images/search.png"/>
					<input type="text" placeholder="搜索"/>
					<input type="button" value="搜索"/>
				</form>
				<i>热搜：</i>
				<ul>
					<li><a href="#">螃蟹</a><span>|</span></li>
					<li><a href="#">蛋卷</a><span>|</span></li>
					<li><a href="#">牛奶</a><span>|</span></li>
					<li><a href="#">大米</a><span>|</span></li>
					<li><a href="#">鸡汤</a><span>|</span></li>
					<li><a href="#">食用油</a><span>|</span></li>
					<li><a href="#">米粉</a>
				</ul>
			</div>
			<div class="shop">
				<span><a href="car.html" id="gouwu">我的购物车</a></span>
			</div>
		</section>
		<!--二级菜单的头部-->
		<section class="t">
			<ul class="margin t-t">
				<li>全部商品分类</li>
				<li><a href="index.html">首页</a></li>
				<li>所有商品</li>
			</ul>
		</section>
		<!--商品详情列表-->
		<section class="margin show">
			<div class="show-l">
				<img src="images/mihoutao.jpg"/>
				<span class="box"></span>
				<p></p>
			</div>
			
			<div class="show-c">
				<img src="images/mihoutao.jpg" id="big" />
			</div>
			<div class="show-r">
				<h5>柜上品野生即食海参500g</h5>
				<ul class="price">
					<li class="first">
						<span>价 &nbsp;  &nbsp; &nbsp;格</span>
						<span>￥128.00</span>
						<span>销售价</span>
					</li>
					<li>元宝最高抵扣: ¥5</li>
					<li>立即<a href="denglu.html">登录</a>/<a href="zhuce.html">注册</a>采集账号</li>
				</ul>
				<ul class="ifm">
					<li>
						<span>销 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;量</span>
						<span>已售出<span style="color:#d42b2e;">119件</span></span>
					</li>
					<li>
						<span>配&nbsp; 送&nbsp; 至</span>
						<span>上海  上海市 黄浦区</span>
						<span style="color:#d42b2e;font-weight:600;">有货</span>
					</li>
					<li>
						<span>运 &nbsp;&nbsp;&nbsp;费</span>
						<span>￥0.00</span>
					</li>
				</ul>
				<div class="mai">
					<input type="button" value="立即购买" />
					<input type="button" value="加入购物车"  id="shop" index="adfwr3" />
				</div>
			</div>

		</section>
		<!--商品列表部分-->
		<section class="margin goods">
			<ul id="m-good">
				<!--<li>
					<img src="images/json1-1.jpg" />
					<p>加入购物车</p>
				</li>-->
			</ul>
		</section>
		
		
		<!--底部-->
		<section class="baozhang">
			<div class="margin">
				<img src="images/baozhang.png" />
			</div>
		</section>
		
		<section id="end">
			<div class="margin">
				<div class="link">
					<dl>
						<dt>购物指南</dt>
						<dd>用户登录</dd>
						<dd>提交订单</dd>
						<dd>订单查询</dd>
						<dd>用户注册</dd>
					</dl>
					<dl>
						<dt>支付方式</dt>
						<dd>用户登录</dd>
						<dd>提交订单</dd>
						<dd>订单查询</dd>
						<dd>用户注册</dd>
					</dl>
					<dl>
						<dt>购物指南</dt>
						<dd>用户登录</dd>
						<dd>提交订单</dd>
						<dd>订单查询</dd>
						<dd>用户注册</dd>
					</dl>
					<dl>
						<dt>购物指南</dt>
						<dd>用户登录</dd>
						<dd>提交订单</dd>
						<dd>订单查询</dd>
						<dd>用户注册</dd>
					</dl>
					<dl>
						<dt>购物指南</dt>
						<dd>用户登录</dd>
						<dd>提交订单</dd>
						<dd>订单查询</dd>
						<dd>用户注册</dd>
					</dl>
				</div>
				<div class="link-r">
					<ul>
						<li>
							<p>微信服务号</p>
							<img src="images/contactus-weixin.jpg" />
						</li>
						<li>
							<p>微信服务号</p>
							<img src="images/contactus-weixin.jpg" />
						</li>
					</ul>
				</div>
			</div>
			</section>
			<!--底部部分-->
			<footer>
				<div class="foot margin">
					<div class="foot-h">
						<span>关于我们</span>
						<span>|</span>
						<span>联系我们</span>
						<span>|</span>
						<span>送礼网</span>
						<span>|</span>
						<span>兑换策</span>
						<span>|</span>
						<span>采集账号介绍</span>
						<span>|</span>
						<span>联系我们</span>
					</div>
					<p>渝ICP备12002277-5号   经营许可证编号:渝B2-20120008  食品流通许可证:SP5009031110004929</p>
					<p>公司地址：重庆市两江新区星光大道软件园海王星E区 订购及售后服务电话:4000-266-357 </p>
					<div class="foot-b">
						<img src="images/foot-1.png" />
						<img src="images/foot-2.gif" />
						<img src="images/foot-3.jpg" />
						<img src="images/foot-4.gif" />
						<img src="images/foot-5.jpg" />
						<img src="images/foot-6.png" />
					</div>
				</div>
			</footer>
		
	</body>
	<!--<script src="libs/require.js" data-main = "libs/jquery.js" data-main = "js/index.js"></script>-->
	<script type="text/javascript" src="libs/jquery.js" ></script>
	<script type="text/javascript" src="libs/cookie.js" ></script>
	<script type="text/javascript" src="js/shop.js" ></script>
	<script src="js/goods-main.js" type="module"></script>
	<script type="text/javascript" src="js/socket.io.js"></script>
	<script type="text/javascript" src="js/port.js"></script>
	<script>
		// var socket = io('http://localhost:3000');
		var socket = io(port);
		socket.on("update",(res)=>{
		var str1 = ""
			
			str1+="<li index ='"+ res.data.title + "'>"+
	 				"<img src='"+ res.data.auth_icon +"' />"
	 				+ res.data.content + "</li>"

		$("#m-good")[0].innerHTML = str + str1;
	})
	var str = ""
	
	$.ajax({
		url:"/api/product",
		data:{
			dataName:"home",
			count:200
		},
		success:function(res){
			// console.log(res.page_data[0].content)
			for(var i=0;i<res.page_data.length;i++){
			str+="<li index ='"+ res.page_data[i].time + "'>"+
	 				"<img src='"+ res.page_data[i].auth_icon +"' />"
	 				+ res.page_data[i].content + "</li>"
			}
		$("#m-good")[0].innerHTML = str;
			
		}
	})
	</script>
</html>

